<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

	<form action="user.action?methodName=toAddUser" method="post">
		<table class="querytable" align="center" width="95%">
			<tr>
				<th>用户编号</th>
				<th>用户名</th>
				<th>用户角色</th>
				<th>昵称</th>
				<th>电话号码</th>
				<th>Email</th>
				<th>注册时间</th>
				<th>操作</th>
			</tr>
			<c:forEach items="${ulist }" var="users">
				<tr>
					<td>${users.userId }</td>
					<td>${users.userName }</td>
					<td>
						<c:if test="${users.userRoles eq '01' }">管理员</c:if>
						<c:if test="${users.userRoles eq '02' }">普通会员</c:if>
					</td>
					<td>${users.nickName }</td>
					<td>${users.tel }</td>
				
					<td>${users.email }</td> 
					<td>${users.regTime }</td>
					<td>
						<a href="user.action?methodName=detailUser&detailOrUpdate=detail&userId=${users.userId }">查看</a>
						<a href="user.action?methodName=detailUser&detailOrUpdate=update&userId=${users.userId }">修改</a>
						<a onclick="return confirm('确认删除该用户吗？');" href="user.action?methodName=doDeleteUser&userId=${users.userId }">删除</a>
					</td>
				</tr>
			</c:forEach>
			<tr>
				<td colspan="8" align="center">
					<input type="submit" value="新增用户信息" />
					<input type="button" value="返回" onclick="window.history.go(-1)"/>
				</td>
			</tr>
		</table>
	</form>


</body>

	<link rel="stylesheet" href="${pageContext.request.contextPath }/css/editTablestyles.css" />
	<script type="text/javascript" src="${pageContext.request.contextPath }/webjars/jquery/1.12.4/jquery.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/listTable.js"></script>

</html>